package com.atguigu.eduservice.client;

import com.atguigu.eduservice.client.Impl.OrderFileDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(name = "service-order",fallback = OrderFileDegradeFeignClient.class)
public interface OrderClient {

    @ApiOperation(value = "根据用户id和课程id查询订单信息,被远程调用的")
    @GetMapping(value = "/orderservice/isBuyCourse/{memberId}/{courseId}")
    public boolean isBuyCourse(@PathVariable(value = "memberId") String memberId,
                               @PathVariable(value = "courseId") String courseId);

}
